package br.ufrj.neg.util;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponseWrapper;

public class BufferedWrapper extends HttpServletResponseWrapper{

	private PrintWriter myWriter;
	
	public BufferedWrapper(HttpServletResponse response) {
		super(response);
	}
	
	public void setWriter(PrintWriter pw){
		this.myWriter = pw;
	}
	
	public PrintWriter getWriter() throws IOException {
		return this.myWriter;
	}
	
	public void flushBuffer(){
		myWriter.flush();
	}
			
}	
